<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            width: 200px;
            height: 200px;
            line-height: 200px;
            text-align: center;
            background: #ccc;
            position: absolute;
            left: 0;
            top: 0;
            transform: rotate(0deg)
        }
    </style>
</head>

<body>
    <div class="box">
        文字文字文字文字
    </div>
</body>
<script>
    let oBox = document.querySelector('.box');
    oBox.addEventListener('touchstart',function(ev){
        ev.preventDefault();
        let dis=Math.sqrt(Math.pow(ev.targetTouches[0].clientX-ev.targetTouches[1].clientX,2)+Math.pow(ev.targetTouches[0].clientY-ev.targetTouches[1].clientY,2))
        let w=oBox.offsetWidth,h=oBox.offsetHeight;
        if(ev.targetTouches.length>=2){
            function fnMove(ev){
                if(ev.targetTouches.length>=2){
                    let dis2=Math.sqrt(Math.pow(ev.targetTouches[0].clientX-ev.targetTouches[1].clientX,2)+Math.pow(ev.targetTouches[0].clientY-ev.targetTouches[1].clientY,2))
                    oBox.style.width=w*dis2/dis+'px';
                    oBox.style.lineHeight=oBox.style.height=h*dis2/dis+'px';
                }
            }
            function fnEnd(){
                oBox.removeEventListener('touchmove',fnMove,false);
                oBox.removeEventListener('touchend',fnEnd,false);
            }
            oBox.addEventListener('touchmove',fnMove,false);
            oBox.addEventListener('touchend',fnEnd,false);
        }
    },false)
</script>

</html>